home *** CD-ROM | disk | FTP | other *** search
/ FM Towns: Free Software Collection 6 / FM Towns Free Software Collection 6.iso / ms_dos / keyin / xecho.c < prev    next >
Encoding:
C/C++ Source or Header  |  1993-07-08  |  507 b   |  37 lines

  1. /*  $name       extend echo $
  2.  *        コマンドラインオプション ファイル名展開対応 echo
  3.  *        展開のされ方はコンパイラに依存 (^^;
  4.  *             4/10/31  Shinwa
  5.  *
  6.  */
  7.  
  8. #include <io.h>
  9. #include <stdlib.h>
  10.  
  11. #define FD_STDOUT (1)
  12.  
  13. print(char *p)
  14. {
  15.     int i = 0;
  16.     
  17.     while(*(p+i)) {
  18.         i++;
  19.     }
  20.     write(FD_STDOUT, p, i);
  21.     write(FD_STDOUT, " ", 1);
  22. }
  23.  
  24. int main(int argc, char *argv[])
  25. {
  26.     int i;
  27.  
  28.     for (i=1; --argc > 0; i++) {
  29.         print(argv[i]);
  30.     }
  31.     
  32.     exit(EXIT_FAILURE);
  33. }
  34.  
  35.  
  36.  
  37.